package com.edu.ad.mapper;

import com.edu.api.entity.ad.PromotionSpace;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.edu.api.entity.common.Pageable;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Entity com.edu.api.entity.ad.PromotionSpace
 */
@Repository
public interface PromotionSpaceMapper extends BaseMapper<PromotionSpace> {

    /**
     * 获取所有广告位
     * @param pageable
     * @param space
     * @return
     */
    List<PromotionSpace> getAllSpace(@Param("pageable") Pageable pageable, @Param("space") PromotionSpace space);

    /**
     * 添加后台用户
     * @param space
     * @return
     */
    Long register(@Param("space") PromotionSpace space);

    /**
     * 通过id批量删除
     * @param ids
     * @return
     */
    Long deleteSpaceByIds(@Param("ids")List ids);

}




